﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;

namespace BUS
{
    public class UserBUS
    {
        private UserDAO userDAO = new UserDAO();

        public User LogUserIn(string userName, string password)
        {
            return userDAO.LogUserIn(userName, password);
        }

        public User LogUserInByProvider(string provider, string providerUserId)
        {
            return userDAO.LogUserInByProvider(provider, providerUserId);
        }

        public void LogUserOut(int id)
        {
            userDAO.LogUserOut(id);
        }

        public User GetUser(int id)
        {
            return userDAO.GetUser(id);
        }

        public User GetUser(string userName)
        {
            return userDAO.GetUser(userName);
        }

        public bool UpdateUser(User user)
        {
            return userDAO.UpdateUser(user);
        }

        public bool AddUser(User user)
        {
            return userDAO.AddUser(user);
        }
    }
}
